Method and apparatus for inter prediction in video coding system

ABSTRACT

A video decoding method performed by a decoding apparatus comprises deriving control points (CPs) for the current block; obtaining motion vectors for the CPs; deriving a motion vector of a sub-block or a sample unit in the current block on the basis of the obtained motion vectors; deriving a prediction sample for the current block on the basis of the derived motion vector; and generating a reconstruction sample on the basis of the prediction sample. The method enables effective performance of inter prediction through the motion vectors (transformation prediction), not only when an image in the current block is moved in a plane, but also when the image in the current block is rotated, zoomed in, zoomed out, or transformed into a parallelogram. Accordingly, the amount of data for the residual signal for the current block can be eliminated or reduced, and the overall coding efficiency can be improved.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.17/688,076, filed on Mar. 7, 2022, which is a continuation of U.S.application Ser. No. 16/863,871, filed on Apr. 30, 2020, now U.S. Pat.No. 11,303,919, which is a continuation of U.S. application Ser. No.16/087,963, filed on Sep. 24, 2018, now U.S. Pat. No. 10,659,801, whichis a National Stage application under 35 U.S.C. § 371 of InternationalApplication No. PCT/KR2016/002961, filed on Mar. 24, 2016, the contentsof which are hereby incorporated by reference herein in their entirety.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates to a video coding technology and, morespecifically, to an inter-prediction method and apparatus in a videocoding system.

Related Art

Demand for high-resolution, high-quality images such as HD (HighDefinition) images and UHD (Ultra High Definition) images have beenincreasing in various fields. As the image data has high resolution andhigh quality, the amount of information or bits to be transmittedincreases relative to the legacy image data. Therefore, when image datais transmitted using a medium such as a conventional wired/wirelessbroadband line or image data is stored using an existing storage medium,the transmission cost and the storage cost thereof are increased.

Accordingly, there is a need for a highly efficient image compressiontechnique for effectively transmitting, storing, and reproducinginformation of high resolution and high quality images.

SUMMARY OF THE INVENTION

A technical object of the present invention is to provide a method andan apparatus for improving video coding efficiency.

Another technical object of the present invention is to provide atransformation prediction model based inter-prediction method andapparatus.

A further technical object of the present invention is to provide amethod and an apparatus for performing motion prediction in units of asample or a sub-block.

Yet another technical object of the present invention is to provide amethod and an apparatus for deriving a motion vector predictor or amotion vector for a control point.

Still another technical object of the present invention is to derive amotion vector for a current block based on a motion vector for a controlpoint.

A further technical object of the present invention is to provide amethod and an apparatus for deriving a motion vector for a control pointbased on neighboring reference blocks or neighboring reference samples.

According to an embodiment of the present invention, a video decodingmethod performed by a decoding apparatus is provided. The decodingmethod comprises: deriving control points (CPs) for a current block;acquiring motion vectors for the CPs; deriving motion vectors in unitsof a sub-block or a sample in the current block based on the acquiredmotion vectors; deriving a prediction sample for the current block basedon the derived motion vectors; and generating a reconstructed samplebased on the prediction sample.

According to another embodiment of the present invention, a decodingapparatus for performing video decoding is provided. The decodingapparatus comprises: a decoder configured to acquire prediction modeinformation about a current block from a bitstream; a predictorconfigured to derive control points (CPs) for the current block, toacquire motion vectors for the CPs, to derive motion vectors in units ofa sub-block or a sample in the current block based on the acquiredmotion vectors and to derive a prediction sample for the current blockbased on the derived motion vectors; and an adder configured to generatea reconstructed sample based on the prediction sample.

According to another embodiment of the present invention, a videoencoding method performed by an encoding apparatus is provided. Theencoding method comprises: deriving control points (CPs) for a currentblock; acquiring motion vectors for the CPs; deriving motion vectors inunits of a sub-block or a sample in the current block based on theacquired motion vectors; generating a prediction sample for the currentblock based on the derived motion vectors; and encoding prediction modeinformation about the current block and information about the derivedmotion vector and outputting the encoded information.

According to another embodiment of the present invention, an encodingapparatus for performing video encoding is provided. The encodingapparatus comprises: a predictor configured to determine a predictionmode for a current block; to derive control points (CPs) for the currentblock, to acquire motion vectors for the CPs, to derive motion vectorsin units of a sub-block or a sample in the current block based on theacquired motion vectors, and to generate a prediction sample for thecurrent block based on the derived motion vectors; and an encoderconfigured to encode prediction mode information about the current blockand information about the derived motion vector and to output theencoded information.

According to the present invention, it is possible to derive moreaccurate motion vectors for a current block and to considerably improveinter-prediction efficiency.

According to the present invention, it is possible to efficiently derivemotion vectors for sub-blocks or sample points of the current blockbased on motion vectors of control points for the current block.

According to the present invention, it is possible to effectivelyperform inter-prediction through motion vectors not only when an imagein the current block is moved in a plane but also when the image isrotated, zoomed in, zoomed out or transformed into a parallelogram.Accordingly, the amount of data for a residual signal for the currentblock can be eliminated and the overall coding efficiency can beimproved.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram schematically illustrating a video encodingapparatus according to an embodiment of the present invention.

FIG. 2 is a block diagram schematically illustrating a video decodingapparatus according to an embodiment of the present invention.

FIG. 3 illustrates a transformation prediction model.

FIG. 4 illustrates prediction directions and reference regions accordingto the transformation prediction model.

FIGS. 5A and 5B schematically show a method of deriving motion vectorsin units of a sub-block.

FIG. 6 illustrates a method of deriving a motion vector for one controlpoint based on two control points.

FIG. 7 schematically shows an example of deriving a motion vector at acontrol point from motion vectors of neighboring blocks.

FIGS. 8A and 8B illustrate a method of deriving motion vectors forcontrol points of a current block based on motion vectors of a pluralityof neighboring blocks.

FIGS. 9A to 9F show examples of setting reference points of a currentblock and neighboring blocks for coordinate extension.

FIG. 10 illustrates neighboring blocks for each control point of acurrent block.

FIG. 11 schematically shows an example of a video encoding methodaccording to the present invention.

FIG. 12 schematically shows an example of a video decoding methodaccording to the present invention.

FIG. 13 is a block diagram schematically showing a predictor included inan encoding apparatus according to the present invention.

FIG. 14 is a block diagram schematically showing a predictor included ina decoding apparatus according to the present invention.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

The present invention can be modified in various forms, and specificembodiments thereof will be described and shown in the drawings.However, the embodiments are not intended for limiting the invention.The terms used in the following description are used to merely describespecific embodiments, but are not intended to limit the invention. Anexpression of a singular number includes an expression of the pluralnumber, so long as it is clearly read differently. The terms such as“include” and “have” are intended to indicate that features, numbers,steps, operations, elements, components, or combinations thereof used inthe following description exist and it should be thus understood thatthe possibility of existence or addition of one or more differentfeatures, numbers, steps, operations, elements, components, orcombinations thereof is not excluded.

On the other hand, elements in the drawings described in the inventionare independently drawn for the purpose of convenience for explanationof different specific functions in an image encoding/decoding device anddoes not mean that the elements are embodied by independent hardware orindependent software. For example, two or more elements of the elementsmay be combined to form a single element, or one element may be dividedinto plural elements. The embodiments in which the elements are combinedand/or divided belong to the invention without departing from theconcept of the invention.

Hereinafter, exemplary embodiments of the invention will be described indetail with reference to the accompanying drawings.

FIG. 1 is a block diagram schematically illustrating a video encodingdevice according to an embodiment of the invention.

Referring to FIG. 1 , a video encoding device 100 includes a picturepartitioner 105, a predictor 110, a transformer 115, a quantizer 120, arearranger 125, an entropy encoder 130, a dequantizer 135, an inversetransformer 140, a filter 145, and memory 150.

The picture partitioner 105 may be configured to split the input pictureinto at least one processing unit block. In this connection, a block asa processing unit may be a prediction unit PU, a transform unit TU, or acoding unit CU. The picture may be composed of a plurality of codingtree unit CTUs. Each CTU may be split into CUs as a quad tree structure.The CU may be split into CUs having a deeper depth as a quad-treestructures. The PU and TU may be obtained from the CU. For example, thePU may be partitioned from a CU into a symmetric or asymmetric squarestructure. Also, the TU may be split into a quad tree structure from theCU. CTU may correspond to CTB (coding tree block), CU may correspond toCB (coding block), PU may correspond to PB (prediction block), and TUmay correspond to TB (transform block).

The predictor 110 includes an inter-prediction unit that performs aninter-prediction process and an intra-prediction unit that performs anintra-prediction process, as will be described later. The predictor 110performs a prediction process on the processing units of a picturedivided by the picture dividing module 105 to create a prediction blockincluding a prediction samples or a prediction samples array. In thepredictor 110, the processing unit of a picture may be a CU, a TU, or aPU. The predictor 110 may determine whether the prediction performed onthe corresponding processing unit is an inter-prediction or anintra-prediction, and may determine specific details for example, aprediction mode of the prediction methods. The processing unit subjectedto the prediction process may be different from the processing unit ofwhich the prediction method and the specific details are determined. Forexample, the prediction method and the prediction mode may be determinedin the units of PU and the prediction process may be performed in theunits of TU.

In the inter-prediction, a prediction process may be performed based oninformation on at least one of a previous picture and/or a subsequentpicture of a current picture to create a prediction block. In theintra-prediction, a prediction process may be performed based on pixelinformation of a current picture to create a prediction block.

As an inter-prediction method, a skip mode, a merge mode, and AdvancedMotion Vector

Prediction (AMVP) may be used. In inter-prediction, a reference picturemay be selected for the PU and a reference block corresponding to the PUmay be selected. The reference block may be selected on an integer pixel(or sample) or fractional pixel (or sample) basis. Then, a predictionblock is generated in which the residual signal with respect to the PUis minimized and the motion vector magnitude is also minimized. Pixels,pels and samples are used interchangeably each other herein.

A prediction block may be generated as an integer pixel unit, or as afractional pixel unit such as a ½ pixel unit or a ¼ pixel unit. In thisconnection, a motion vector may also be expressed as a fractional pixelunit.

Information such as the index of the reference picture selected via theinter-prediction, the motion vector difference MVD, the motion vectorpredictor MVP, residual signal, etc., may be entropy encoded and thentransmitted to the decoding device. When the skip mode is applied, theprediction block may be used as a reconstruction block, so that theresidual may not be generated, transformed, quantized, or transmitted.

When the intra-prediction is performed, the prediction mode may bedetermined in the unit of PU and the prediction process may be performedin the unit of PU. Alternatively, the prediction mode may be determinedin the unit of PU and the inter-prediction may be performed in the unitof TU.

The prediction modes in the intra-prediction may include 33 directionalprediction modes and at least two non-directional modes, as an example.The non-directional modes may include a DC prediction mode and a planarmode.

In the intra-prediction, a prediction block may be constructed after afilter is applied to a reference sample. At this time, it may bedetermined whether a filter should be applied to a reference sampleaccording to the intra-prediction mode and/or the size of a currentblock.

Residual values (a residual block or a residual signal) between theconstructed prediction block and the original block are input to thetransformer 115. The prediction mode information, the motion vectorinformation, and the like used for the prediction are encoded along withthe residual values by the entropy encoder 130 and are transmitted tothe decoding device.

The transformer 115 performs a transform process on the residual blockin the unit of TUs and generates transform coefficients.

A transform block is a rectangular block of samples and is a block towhich the same transform is applied. The transform block may be a TU andmay have a quad-tree structure.

The transformer 115 may perform a transform process according to theprediction mode applied to a residual block and the size of the block.

For example, when intra-prediction is applied to a residual block andthe residual block has an 4×4 array, the residual block is transformedusing discrete sine transform DST. Otherwise, the residual block may betransformed using discrete cosine transform DCT.

The transformer 115 may construct a transform block of transformcoefficients through the transform.

The quantizer 120 may quantize the residual values, that is, transformcoefficients, transformed by the transformer 115 and may createquantization coefficients. The values calculated by the quantizer 120may be supplied to the dequantizer 135 and the rearranger 125.

The rearranger 125 may rearrange the transform coefficients suppliedfrom the quantizer 120. By rearranging the quantization coefficients, itis possible to enhance the encoding efficiency in the entropy encoder130.

The rearranger 125 may rearrange the quantized transform coefficients inthe form of a two-dimensional block to the form of a one-dimensionalvector through the use of a coefficient scanning method.

The entropy encoder 130 may be configured to entropy code the symbolaccording to a probability distribution based on the quantized transformvalues rearranged by the rearranger 125 or the encoding parameter valuecalculated during the encoding process, etc. and then to output abitstream. The entropy encoding method is a method of receiving a symbolhaving various values and expressing the symbol as a binary string thatcan be decoded while removing statistical redundancy thereof.

In this connection, the symbol means the to-be encoded/decoded syntaxelement, coding parameter, residual signal value and so on. The encodingparameter is required for encoding and decoding. The encoding parametermay contain information that can be inferred during encoding ordecoding, as well as information encoded in an encoding device andpassed to a decoding device like the syntax element. The encodingparameter is the information needed to encode or decode the image. Theencoding parameter may include statistics or values such as for example,the intra/inter-prediction mode, movement/motion vector, referencepicture index, coding block pattern, residual signal presence orabsence, transform coefficient, quantized transform coefficient,quantization parameter, block size, block partitioning information, etc.Also, the residual signal may mean a difference between an originalsignal and a prediction signal. Also, the difference between theoriginal signal and the prediction signal may be transformed to definethe residual signal, or the difference between the original signal andthe prediction signal may be transformed and quantized to define theresidual signal. The residual signal can be called the residual block inthe block unit, and can be called the residual samples in the sampleunit.

When the entropy encoding is applied, the symbols may be expressed sothat a small number of bits are allocated to a symbol having a highprobability of occurrence, and a large number of bits are allocated to asymbol having a low probability of occurrence. This may reduce the sizeof the bit string for the to-be-encoded symbols. Accordingly, thecompression performance of image encoding may be increased via theentropy encoding.

Encoding schemes such as exponential Golomb, Context-Adaptive VariableLength Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding(CABAC) may be used for the entropy encoding. For example, the entropyencoder 130 may store therein a table for performing entropy encoding,such as a variable length coding/code (VLC) table. The entropy encoder130 may perform entropy encoding using the stored VLC table. Also, theentropy encoder 130 derives a binarization method of a correspondingsymbol and a probability model of a corresponding symbol/bin, and thenperforms entropy encoding using the derived binarization method orprobability model.

The entropy encoder 130 may give a predetermined change to a parameterset or syntaxes to be transmitted, when necessary.

The dequantizer 135 dequantizes the values transform coefficientsquantized by the quantizer 120. The inverse transformer 140 inverselytransforms the values dequantized by the dequantizer 135.

The residual value or residual samples or residual samples arraygenerated by the dequantizer 135 and the inverse-transformer 140, andthe prediction block predicted by the predictor 110 may be combined toform a reconstructed block including a reconstructed sample or areconstructed sample array.

In FIG. 1 , a residual block and a prediction block are added to createa reconstructed block by an adder. At this time, the adder may beconsidered as a particular unit reconstructed block creating unit thatgenerates a reconstructed block.

The filter 145 applies a deblocking filter, an ALF Adaptive Loop Filter,an SAO Sample Adaptive Offset to the reconstructed picture.

The deblocking filter removes a block distortion generated at theboundary between blocks in the reconstructed picture. The ALF performs afiltering process based on the result values of the comparison of theoriginal picture with the reconstructed picture of which the blocks arefiltered by the deblocking filter. The ALF may be applied only when highefficiency is necessary. The SAO reconstructs offset differences betweenthe residual blocks having the deblocking filter applied thereto and theoriginal picture and is applied in the form of a band offset, an edgeoffset, or the like.

The memory 150 may store the reconstructed block or picture calculatedby the filter 145. The reconstructed block or picture stored in thememory 150 may be supplied to the predictor 110 that performs theinter-prediction.

FIG. 2 is a block diagram schematically illustrating a video decodingdevice according to an embodiment of the invention. Referring to FIG. 2, a video decoding device 200 may include an entropy decoder 210, arearranger 215, a dequantizer 220, an inverse transformer 225, apredictor 230, a filter 235, and memory 240.

When a video bitstream is input from the video encoding device, theinput bitstream may be decoded based on the order in which videoinformation is processed by the video encoding device.

The entropy decoder 210 may entropy-decode the input bitstream accordingto a probability distribution to generate symbols in a quantizedcoefficient form. The entropy decoding method is a method of receiving asequence of binary numbers and generating each of the symbols using thesequence. The entropy decoding method is similar to the entropy encodingmethod described above.

For example, when a Variable Length Coding VLC (hereinafter referred toas ‘VLC’) such as CAVLC is used to perform entropy encoding in a videoencoding device, the entropy decoder 210 may perform decoding using thesame VLC table as the encoding device used in the encoding device. Also,when CABAC is used to perform entropy encoding in a video encodingdevice, the entropy decoder 210 may perform the entropy decoding usingCABAC.

More specifically, the CABAC entropy decoding method may includereceiving a bin corresponding to each syntax element in a bitstream,determining a context model using to-be-decoded syntax elementinformation, decoding information of a neighboring block and ato-be-decoded block, or information of a symbol/bin decoded in aprevious step, and predicting a probability of occurrence of a binaccording to the determined context model and thus performing arithmeticdecoding of the bin to generate a symbol corresponding to a value ofeach syntax element. In this connection, after determining the contextmodel, the CABAC entropy decoding method may further include a step ofupdating the context model using the information of the decodedsymbol/bin to determine a context model of the next symbol/bin.

Information for constructing a predicted block out of the informationdecoded by the entropy decoder 210 may be supplied to the predictor 230,and the residual values, that is, the quantized transform coefficients,entropy-decoded by the entropy decoder 210 may be input to therearranger 215.

The rearranger 215 may rearrange the bitstream information, that is, thequantized transform coefficients, entropy-decoded by the entropy decoder210 based on the rearrangement method in the video encoding device.

The rearranger 215 may reconstruct and rearrange the coefficientsexpressed in the form of a one-dimensional vector into coefficients inthe form of a two-dimensional block. The rearranger 215 may scan thecoefficients based on the prediction mode applied to the current blocktransform block and the size of the transform block and may create anarray of coefficients quantized transform coefficients in the form of atwo-dimensional block.

The dequantizer 220 may perform dequantization based on the quantizationparameters supplied from the video encoding device and the coefficientvalues of the rearranged block.

The inverse transformer 225 may perform the inverse DCT and/or inverseDST of the DCT and/or DST, which has been performed by the transformerof the video encoding device, on the quantization result from the videoencoding device.

The inverse transform may be performed based on a transfer unit or apartition unit of a picture determined by the video encoding device. Thetransformer of the video encoding device may selectively perform the DCTand/or DST according to plural information pieces such as the predictionmethod, the size of a current block, and the prediction direction, andthe inverse transformer 225 of the video decoding device may perform theinverse transform based on the transform information on the transformperformed by the transformer of the video encoding device.

The predictor 230 generates a prediction block including predictionsamples or prediction samples array based on the prediction blockgeneration-related information provided by the entropy decoder 210 andthe previously decoded block and/or picture information provided fromthe memory 240.

When the prediction mode for the current PU is the intra-predictionmode, the predictor 230 may perform the intra-prediction to generate aprediction block based on pixel information in the current picture.

When the prediction mode for the current PU is the inter-predictionmode, the predictor 230 may be configured to perform inter-prediction ona current PU based on information included in at least one picture of aprevious picture or a subsequent picture to the current picture. In thisconnection, information about the motion information necessary forinter-prediction of the current PU provided in the video encodingdevice, such as motion vector and reference picture index may be deducedvia checking the skip flag and merge flag received from the encodingdevice.

The predictor 230 may generate a prediction block such that the residualsignal relative to the current block is minimized and the motion vectorsize is minimized when inter-prediction is performed on the currentpicture.

On the other hand, the motion information derivation method may bechanged according to the prediction mode of the current block. Theprediction mode applied to inter-prediction may include an AdvancedMotion Vector Prediction (AMVP) mode, a merge mode, and the like.

For example, when a merge mode is applied, the encoding device and thedecoding device may generate a merge candidate list using the motionvector of the reconstructed spatial neighboring block and/or the motionvector corresponding to the Col block which is a temporally neighboringblock. In the merge mode, the motion vector of the candidate blockselected in the merge candidate list is used as the motion vector of thecurrent block. The encoding device may transmit a merge index indicatinga candidate block having an optimal motion vector selected from thecandidate blocks included in the merge candidate list to the decodingdevice. In this case, the decoding device may derive the motion vectorof the current block using the merge index.

In another example, when the AMVP (Advanced Motion Vector Prediction)mode is applied, the encoding device and decoding device generate amotion vector predictor candidate list using a motion vector of areconstructed spatial neighboring block and/or a motion vectorcorresponding to a Col block as a temporal neighboring block. That is,the motion vector of the reconstructed spatial neighboring block and/orthe motion vector corresponding to the Col block as a temporalneighboring block may be used as a motion vector candidate. The encodingdevice may transmit to the decoding device a prediction motion vectorindex indicating the optimal motion vector selected from among themotion vector candidates included in the motion vector predictorcandidate list. In this connection, the decoding device may select theprediction motion vector for the current block from the motion vectorcandidates included in the motion vector candidate list using the motionvector index.

The encoding device may obtain the motion vector difference MVD betweenthe motion vector for the current block and the motion vector predictor(MVP), encode the MVD, and transmit the encoded MVD to the decodingdevice. That is, the MVD may be a value obtained by subtracting themotion vector predictor (MVP) from the motion vector (MV) for thecurrent block. In this connection, the decoding device may decode thereceived motion vector difference, and derive the motion vector for thecurrent block via addition between the decoded motion vector differenceand the motion vector predictor.

Also, the encoding device may transmit a reference picture indexindicating a reference picture to the decoding device.

The predictor 230 of the decoding device may predict the motion vectorof the current block using the motion information of the neighboringblock and derive the motion vector of the current block using theresidual received from the encoding device. The decoding device maygenerate prediction sample (or prediction sample array) for the currentblock based on the derived motion vector and the reference picture indexinformation received from the encoding device.

The decoding device may generate a reconstructed sample (orreconstructed sample array) by adding a prediction sample (or predictionsample array) to a residual sample (residual sample array) acquired fromtransform coefficients transmitted from the encoding device. Based onthe reconstructed sample, a reconstructed block and a reconstructedpicture may be generated.

In the above-described AMVP and merge modes, motion information of thereconstructed neighboring block and/or motion information of the Colblock may be used to derive motion information of the current block.

In the skip mode, which is one of the other modes used forinter-prediction, neighboring block information may be used for thecurrent block as it is. Accordingly, in the case of skip mode, theencoder does not transmit syntax information such as the residual to thedecoding device in addition to information indicating which block'smotion information to use as the motion information for the currentblock.

The reconstructed block may be generated using the predicted blockgenerated by the predictor 230 and the residual block provided by theinverse-transformer 225. FIG. 2 illustrates that using the adder, thepredicted block and the residual block are combined to generate thereconstructed block. In this connection, the adder may be viewed as aseparate element (a reconstructed block generator) that is configured togenerate the reconstructed block. In this connection, the reconstructedblock includes reconstructed samples or a reconstructed samples array asdescribed above; the predicted block includes a prediction samples or aprediction samples array; the residual block may include a residualsamples or a residual samples array. Accordingly, the reconstructedsamples or the reconstructed samples array can be considered to begenerated by combining the corresponding prediction samples orprediction samples array with the corresponding residual samples orresidual samples array.

When the skip mode is used for a block, the residual signal may not betransmitted and the predicted block may be used as a reconstructedblock.

The reconstructed block and/or picture may be supplied to the filter235. The filter 235 may perform a deblocking filtering operation, an SAOoperation, and/or an ALF operation on the reconstructed block and/orpicture.

The memory 240 may store the reconstructed picture or block for use as areference picture or a reference block and may supply the reconstructedpicture to an output unit.

The elements that is directly related to decoding images among theentropy decoder 210, the rearranger 215, the dequantizer 220, theinverse transformer 225, the predictor 230, the filter 235 and thememory 240 which are included in the decoding device 200, for example,the entropy decoder 210, the rearranger 215, the dequantizer 220, theinverse transformer 225, the predictor 230, the filter 235, and so onmay be expressed as a decoder or a decoding module that is distinguishedfrom other elements.

In addition, the decoding device 200 may further include a parser notshown in the drawing that parses information related to the encodedimages included in a bitstream. The parser may include the entropydecoder 210, and may be included in the entropy decoder 210. Such aparser may also be implemented as an element of the decoding module.

Inter-prediction for the current block may be performed in considerationof a target object or motion of an image between pictures. However, aconventional inter-prediction method uses only one motion vector inunits of a prediction block (PB). In this case, high predictionperformance can be obtained when an image (part thereof) is moved in aplane with the lapse of time but prediction performance is deterioratedwhen the image is transformed such as being rotated, zoomed in or zoomedout. Hereinafter, image distortion may include the aforementioned imagetransformation such as rotation, zoom-in and zoom-out.

The present invention provides an inter-prediction method inconsideration of such image distortion. According to the presentinvention, it is possible to efficiently derive motion vectors forsub-blocks or sample points of the current block and to improveinter-prediction accuracy in spite of transformation such as rotation,zoom-in or zoom-out of an image. Prediction model according to thepresent invention may be referred to as a transformation predictionmodel. According to the present invention, transformation of the currentblock into a parallelogram, for example, may be predicted. That is,according to the present invention, inter-prediction can be efficientlyperformed through motion prediction even when an image in the currentblock is transformed into a parallelogram in a reference picture. In amotion prediction method according to the present invention, adistortion form of the image may be predicted based on motion vectors atcontrol points (CPs) of the current block and inter-prediction accuracymay be increased to improve image compression performance. Furthermore,according to the present invention, a motion vector for at least onecontrol point of the current block can be derived using motion vectorsof neighboring blocks, the amount of data with respect to addedadditional information can be reduced and inter-prediction efficiencycan be considerably improved.

The prediction method according to the present invention requires motioninformation at three control points, that is, three reference points,for example.

FIG. 3 illustrates a transformation prediction model. Although it isassumed that the height and the width of a current block 300 areidentical as S in FIG. 3 , this is an example and the height may differfrom the width. Here, the current block 300 may include a predictionblock PB. The prediction block may be a block derived from a codingblock through a partitioning procedure, and a specific inter-predictionmode such as whether the transformation prediction model (ortransformation prediction mode) is applied may be determined in units ofthe prediction block. For example, whether inter-prediction is appliedor intra-prediction is applied is determined in units of the codingblock. When inter-prediction is applied to the coding block includingthe prediction block, whether a specific inter-prediction mode isapplied to the prediction block may be determined.

Referring to FIG. 3 , x and y represent x and y coordinates of eachsample in the current block 300, and x′ and y′ represent x and ycoordinates of a corresponding sample in a reference picturecorresponding to x and y. In this case, a region including samples of asample position indicated by (x′, y′) may be referred to as a referenceblock 350 or a reference region 350. In this case, the reference block350 may correspond to a region including an image transformed from animage in the current block 300 according to transformation such asrotation, zoom-in or zoom-out. Accordingly, the size and shape of thereference block 350 may differ from those of the current block 300.

When a top-left sample position in the current block 300 is (0, 0), xand y may be determined based on the top-left sample position (0, 0). Inaddition, x′ and y′ may be determined based on coordinates of a positionin the reference picture, which is identical or corresponding to thetop-left sample position of the current block 300.

As shown in FIG. 3 , x′ and y′ may be represented as x′=ax+by+e andy′=cx+dy+f. Further, v_(x)=x−x′ and vy=y−y′. A transformation predictionmodel formula may be represented by vx=(1−ax)−by−e and vy=−cx+(1−d)y−fby arranging the aforementioned equations. Here, v_(x) represents anx-component of a motion vector of a (x, y) coordinate sample in thecurrent block 300 and v_(y) represents a y-component of the motionvector of the (x, y) coordinate sample in the current block 300. Thatis, (v_(x), v_(y)) represents the motion vector of the (x, y) coordinatesample. Therefore, according to the transformation prediction model,different motion vectors may be obtained according to sample coordinatesin the current block.

To apply the transformation prediction model, control points need to bedefined. For example, sample positions (0, 0), (S, 0) and (0, S) asshown in FIG. 3 may be determined as control points. Hereinafter, acontrol point of the sample position (0, 0) may be referred to as CP0, acontrol point of the sample position (S, 0) may be referred to as CP1and a control point of the sample position (0, S) may be referred to asCP2. Although it is assumed that the height and the width of the currentblock 30 are identical in this example, the control points can havecoordinates (0, 0), (W, 0) and (0, H) if the height of the current block300 is H and the width thereof is W, and W or H can replace S inequations described below.

The aforementioned transformation prediction mode formula can be solvedusing the above-described control points and motion vectors for thecontrol points. Here, parameters a, b, c, d, e and f of thetransformation prediction model formula may be solved as follows.

$\begin{matrix}{{a = {1 - \frac{v_{x1} - v_{x0}}{S}}},{b = {- \frac{v_{x2} - v_{x0}}{S}}},{e = {- v_{x0}}}} & \lbrack {{Equation}1} \rbrack\end{matrix}$${c = {- \frac{v_{y1} - v_{y0}}{S}}},{d = {1 - \frac{v_{y2} - v_{y0}}{S}}},{f = {- v_{y0}}}$

Here, v_(x0) and v_(y0) represent an x-component and a y-component ofthe motion vector of CPO, v_(x1) and v_(y1) represent an x-component anda y-component of the motion vector of CP1 and v_(x2) and v_(y2)represent an x-component and a y-component of the motion vector of CP2.

The transformation prediction model formula may be arranged as followsbased on the parameters of Equation 1.

$\begin{matrix}{v_{x} = {{\frac{v_{x1} - v_{x0}}{S}x} + {\frac{v_{x2} - v_{x0}}{S}y} + v_{x0}}} & \lbrack {{Equation}2} \rbrack\end{matrix}$$v_{y} = {{\frac{v_{y1} - v_{y0}}{S}x} + {\frac{v_{y2} - v_{y0}}{S}y} + v_{y0}}$

Here, motion vectors according to sample positions in the current blockcan be derived according to Equation 2 because the motion vector of CP0,the motion vector of CP1 and the motion vector of CP2 are known. Thatis, according to the transformation prediction model, motion vectorsv0(v_(x0), v_(y0)), v1(v_(x1), v_(y1)) and v2(v_(x2), v_(y2)) at thecontrol points can be scaled based on distance ratios of coordinates (x,y) of a target sample the three control points to derive a motion vectorat the sample position.

FIG. 4 illustrates prediction directions and reference regions accordingto the transformation prediction model.

Referring to FIG. 4 , when prediction according to the transformationprediction model is performed on a current block 400 in a currentpicture, a reference region 450 or 460 may be positioned as shown.

For prediction for the current block, one or two reference picture listsmay be used. That is, reference picture list 0 or reference picture list1 may be used or both reference picture lists 0 and 1 may be configuredfor prediction for the current block. For example, at least one of theaforementioned two reference pictures may be used when a slice type of aslice in which the current block is included is B (B slice) and onlyreference picture list 0 may be used when the slice type of the slice inwhich the current block is included is P (P slice). Reference picturelist 0 may be referred to as L0 and reference picture list 1 may bereferred to as L1. In execution of prediction for the current block,inter-prediction based on L0 may be referred to as L0 prediction,inter-prediction based on L1 may be referred to as L1 prediction, andinter-prediction based on L0 and L1 (i.e., combination of L0 predictionand L1 prediction) may be referred to as BI-prediction. In this case,separate motion vectors may be used for L0 prediction and L1 prediction.That is, when motion vectors are derived in units of a sample or asub-lock which will be described later according to the transformationprediction model, separate motion vectors may be derived in units of thesample or sub-block according to whether L0 prediction and/or L1prediction is applied. For example, a motion vector MVL0 for L0prediction and a motion vector MVL1 for L1 prediction for a first sampleor a first sub-block in the current block may be separately derived.

For example, when a first reference picture is a decoded pictureincluded in L0, the slice type of the slice in which the current block400 is included is P or B, and L0 is used in FIG. 4 , the firstreference picture may be used for prediction of the current block 400according to the present invention. In this case, the reference region450 in the first reference picture may be derived based on motionvectors for the current block 400, which are derived according to theabove-described transformation prediction model, and prediction samplesof the current block 400 may be derived based on reconstructed samplesin the reference region 450.

On the other hand, when the first reference picture is a decoded pictureincluded in L0, a second reference picture is a decoded picture includedin L1, the slice type of the slice in which the current block 400 isincluded is B, and both L0 and L1 (i.e., BI) are used in FIG. 4 , thefirst reference picture and the second reference picture may be used forprediction of the current block 400 according to the present invention.In this case, the reference region 450 in the first reference picturemay be derived based on motion vectors for L0 prediction for the currentblock 400, which are derived according to the aforementionedtransformation prediction model, and the reference region 460 in thesecond reference picture may be derived based on motion vectors for L1prediction. In this case, prediction samples of the current block 400may be derived based on reconstructed samples in the reference region450 and reconstructed samples in the reference region 460. For example,the prediction samples of the current block 400 may be derived throughthe weighted sum of the reconstructed samples in the reference region450 and the reconstructed samples in the reference region 460. Here, theweighted sum may be obtained based on a first time distance between thecurrent picture and the first reference picture and a second timedistance between the current picture and the second reference picture.Here, a time distance may represent a picture order count (POC)difference. That is, a difference between a POC value of the currentpicture and a POC value of the first reference picture may be the firsttime distance and a difference between the POC value of the currentpicture and a POC value of the second reference picture may be thesecond time distance.

One of L0 prediction and L1 prediction is applied in the followingdescription in order to avoid redundant description. Based on this,motion vectors for L0 prediction and motion vectors for L1 predictionmay be individually derived and Bi prediction may be performed.

According to the above-described transformation prediction model, motionvectors in units of a pixel (i.e., in units of a sample) can be derivedand inter-prediction accuracy can be considerably improved. However,when the transformation prediction model is used, complexity in motioncompensation may remarkably increase. In addition, a motion vector foreach control point is required and thus three pieces of motioninformation per prediction block need to be provided (i.e., signaled).Further, there are lots of data to be encoded compared to conventionalmotion prediction methods in which one piece of motion information isprovided per prediction block, in general. To solve this problem, thepresent invention may provide the following method.

For example, to reduce complexity in motion compensation due to motionvector derivation in units of a pixel, motion vectors may be derived inunits of a sub-block in a prediction block. The sub-block may be set tovarious sizes. For example, when the sub-block is set to an n×n size (nis a positive integer, e.g., n is 4), (transformation prediction) motionvectors may be derived in units of an n×n sub-block in the current blockand various methods for deriving a motion vector which represents eachsub-block may be applied.

FIGS. 5A and 5B schematically show a method of deriving a motion vectorin units of a sub-block. FIGS. 5A and 5B illustrate cases in which thecurrent block has a size of 16×16 and motion vectors are derived inunits of a 4×4 sub-block.

Referring to FIGS. 5A and 5B, the current block may be divided into aplurality of 4×4 sub-blocks. A representative motion vector may be setper sub-block. In this case, a motion vector at representativecoordinates (i.e., a representative sample position) of each sub-blockmay be the representative motion vector.

FIG. 5A shows a case in which motion vectors are derived using thetop-left sample position of each sub-block as representativecoordinates. In this case, a representative motion vector of eachsub-block may be derived by putting representative coordinates (0, 0),(4, 0), (8, 0), . . . , (12, 12) of sub-blocks in the aforementionedequation 2.

Further, FIG. 5B shows a case in which motion vectors are derived usingthe center or center lower right side sample position of each sub-blockas representative coordinates. Here, a center lower right side positionrefers to a position of a sample disposed at a lower right side amongfour samples positioned at the center of a sub-block. For example, whenn is an odd number, one sample is positioned at the center of asub-block and, in this case, a center sample position may be used.However, when n is an even number, 4 samples are contiguous at thecenter of a sub-block. In this case, a lower right side sample positionmay be used. In the case of (b) of FIG. 4 , a representative motionvector of each sub-block may be derived by putting representativecoordinates (2, 2), (6, 2), (10, 2), . . . , (14, 14) of sub-blocks inthe aforementioned equation 2.

Furthermore, to reduce the amount of data to be encoded with respect tomotion information about three control points per prediction block, thenumber of control points may be limited to 2, for example. That is, itis possible to signal motion information about the two control pointsinstead of signaling motion information about the three control points.The transformation prediction model may represent transformation in theform of rotation, zoom-in and zoom-out and transformation into aparallelogram and, when two control points on a straight line are valid,the transformation prediction model can represent at leasttransformation in the form of rotation, zoom-in and zoom-out.Accordingly, motion prediction may be performed using motion vectors ofthe two control points and motion vectors for the current block may bederived according to circumstances in order to reduce the amount of dataregarding motion information. In this case, motion vectors for CP0 andCP1 may be explicitly signaled or information for deriving theaforementioned motion vectors may be signaled and a motion vector forCP2 may be calculated based on the signaled motion vectors orinformation, for example.

FIG. 6 illustrates a method of deriving a motion vector for theremaining one control point based on the two control points.

Referring to FIG. 6 , when CP0 and CP1 on a straight line are present astwo control points for a current block 600, a motion vector v2 (v_(x2),v_(y2)) for CP2 positioned at a lower left sample position of thecurrent block 600 may be derived based on motion vectors for CP0 andCP1. When a motion vector v0 for CP0 is (v_(x0), v_(y0)), a motionvector v1 for CP1 is (x_(v1), v_(y1)), and the height and width of thecurrent block are identical as S, −v_(x0)+v_(x2)=v_(y0)−v_(y1) andS−v_(x0)+v_(x1)=S+v_(y2)−v_(y0) as shown in FIG. 6 . The aforementionedequations are arranged as v_(x2)=v_(x0)+v_(y0)−v_(y1) andv_(y2)=v_(y0)−v_(x0)+v_(x1).

Accordingly, in this case, a transformation prediction model formuladerived based on the two control points CP0 and CP1 may be representedas follows.

$\begin{matrix}{v_{x} = {{\frac{v_{x1} - v_{x0}}{S}x} - {\frac{v_{y1} - v_{y0}}{S}y} + v_{x0}}} & \lbrack {{Equation}3} \rbrack\end{matrix}$$v_{y} = {{\frac{v_{y1} - v_{y0}}{S}x} + {\frac{v_{x1} - v_{x0}}{S}y} + v_{y0}}$

The transformation prediction model may be applied using motion vectorsat two control points through the above-described method, and areference region 650 may be detected based on the derived motion vectorsand prediction accuracy may be improved through the transformationprediction model.

Meanwhile, motion vectors for control points may be derived based onneighboring blocks (or neighboring sub-blocks or neighboring samples).For example, when a merge mode or a skip mode is applied, a motionvector of a neighboring block (or neighboring sub-block or a neighboringsample) may be directly derived as a motion vector of a control pointthrough scaling or a predefined transformation. When an advanced motionvector prediction (AMVP) mode is applied, as another example, a motionvector of a control point may be derived by deriving a motion vectorpredictor (MVP) of the control point based on motion vectors ofneighboring blocks (or neighboring sub-blocks or neighboring samples)and adding an additionally signaled motion vector difference to the MVP.

Specifically, when the merge mode or a skip mode is applied to thecurrent block, for example, motion vectors of neighboring blocks may beused as motion vectors of control points in order to apply thetransformation prediction model. In a normal image, since motionsimilarity between a current block and a neighboring block is high, amotion vector at a control point of the current block may be derivedusing the motion vector of the neighboring block when the transformationprediction model is also applied to the neighboring block.

FIG. 7 schematically shows an example of deriving a motion vector at acontrol point from a motion vector of a neighboring block.

Referring to FIG. 7 , it is assumed that the transformation predictionmodel is applied to a left neighboring block 720 of a current block 700,a motion vector of a control point cp0 of the left neighboring block 720is v0(v_(x0), v_(y0)), a motion vector of a control point cp1 isv1(v_(x1), v_(y1)), and a motion vector of a control point cp2 isv2(v_(x2), v_(y2)). Here, if only information about motion vectors fortwo control points is signaled, as described above, v2 may be a motionvector derived using v0 and v1 as represented by relations of FIGS. 5Aand 5B.

When a motion vector of a control point CP0 of the current block 700 isV0(V_(x0), V_(y0)) and a motion vector of a control point CP2 isV2(V_(x2), V_(y2)), the motion vector of the left neighboring block 720may be scaled at a size ratio of the current block 700 to the leftneighboring block 720 to derive V0, V1 and V2. Further, when it isassumed that the left neighboring block 720 is an s×s size block, samplecoordinates (s, s) derived using the top-left sample position of theleft neighboring block 720 as a base (0, 0) may be the same as samplecoordinates (0, S) derived using the top-left sample position of thecurrent block 700 as a base (0, 0) on the assumption that the currentblock 700 is an S×S size block. Accordingly, a motion vector of thesample coordinates (s, s) of the left neighboring block 720, derivedaccording to the transformation prediction model formula, may be used asa motion vector of CP2 of the current block 700. If the left neighboringblock 720 is a w×h size block and the current block 700 is a W×H sizeblock, a motion vector of sample coordinates (w, h) of the leftneighboring block 720, derived according to the transformationprediction model formula, may be used as a motion vector of CP2 of thecurrent block 700.

When the motion vector of the current block is derived and used based ona motion vector of a neighboring block to which the transformationprediction model has been applied, as described in the above embodiment,the motion vector of the current block is affected only bytransformation of the one neighboring block. Further, when two controlpoints are used as described above, the amount of data regarding motioninformation which needs to be transmitted can be reduced. However,effects of the transformation prediction model may significantlydeteriorate when a motion vector of a neighboring block varies invarious manners because the transformation prediction model is limitedto transformation of rotation, zoom-in and zoom-out. Particularly, inthe case of the merge mode or the skip mode, MVP signaling for motionvectors is not required and thus it is efficient to use three availablecontrol points for inter-prediction of an image having lots oftransformations.

Accordingly, for more efficient inter-prediction, motion vectors forcontrol points of the current block may be derived based on a pluralityof neighboring blocks.

FIGS. 8A and 8B illustrate a method of deriving motion vectors forcontrol points of the current block based on motion vectors of aplurality of neighboring blocks.

Referring to FIGS. 8A and 8B, motion vectors for control points of thecurrent block may be derived based on motion vectors of neighboringblocks (or neighboring sub-blocks) adjacent to the control points of thecurrent block. A block may include a sub-block in the presentembodiment.

FIG. 8A shows an example of reusing a motion vector of a neighboringblock as a motion vector at a control point of the current block. Aupper left neighboring block may be determined as a candidate forderiving a motion vector VO of CP0 at a sample position (0, 0) of thecurrent block, an upper right neighboring block may be determined as acandidate for deriving a motion vector V1 of CP1 at a sample position(S, 0), and a lower left neighboring block may be determined as acandidate for deriving a motion vector V2 of CP2 at a sample position(0, 2). Here, when the corresponding neighboring blocks are unavailableor have not been coded in the inter mode, other blocks adjacent to thecorresponding neighboring blocks may be used as candidate blocks. Casesin which neighboring blocks are unavailable will be described later.

A motion vector of an available candidate block may be used as a motionvector of a control point corresponding thereto. For example, a motionvector of an upper left neighboring block or a representative motionvector of a upper left neighboring sub-block may be used as V0 of CP0, amotion vector of an upper right neighboring block or a representativemotion vector of a upper right neighboring sub-block may be used as V1of CP1, and a motion vector of a lower left neighboring block or arepresentative motion vector of a lower left neighboring sub-block maybe used as V2 of CP2.

Further, FIG. 8B shows an example of extending coordinates based onneighboring blocks adjacent to the current block and deriving a motionvector according to coordinates at each control point using motionvectors of the neighboring blocks. That is, coordinates including theneighboring blocks are reconfigured and motion vectors with respect tothe reconfigured coordinates may be derived using the aforementionedequation 2. Here, when only two control points on a straight line areavailable, that is, when neighboring blocks of CP0 and CP1 or CP1 andCP2 are valid, motion vectors with respect to coordinates reconfiguredbased on the aforementioned equation 3 may be derived.

FIGS. 9A to 9F show an example of setting reference points of a currentblock and neighboring blocks for coordinate extension.

Referring to FIGS. 9A to 9F, derived motion vectors may vary accordingto setting of coordinates of neighboring blocks adjacent to the currentblock and coordinates of control points of the current block. Forexample, a reference point (0, 0) may be set to a top-left sampleposition of an upper left neighboring block (sub-block) or to a centeror center lower right side sample position. In this case, coordinates ofeach sample and sub-block in the current block vary according to thereference point and coordinates of control points also vary. In thiscase, a motion vector at each coordinates in the current block may beobtained using changed coordinates based on Equation 2 or 3. Here, amotion vector for each control point in the current block may beobtained and then the transformation prediction model formula may bere-derived based on the motion vector, or motion vectors in units of asample or a sub-block in the current block may be directly obtainedbased on changed coordinates.

Specifically, referring to (a), when the block size is increased suchthat the block includes neighboring candidate blocks adjacent to eachcontrol point, for example, coordinates for the neighboring candidateblocks according to extended coordinates may be (0, 0), (S+4, 0) and (0,S+4). Here, when it is assumed that a motion vector for each neighboringcandidate block is present having the corresponding coordinates asrepresentative coordinates, a motion vector for each control point ofthe current block may be arranged as follows based on the aforementionedequation 2.

$\begin{matrix}{V_{x0} = {{\frac{v_{x1} - v_{x0}}{S + 4}4} + {\frac{v_{x2} - v_{x0}}{S + 4}4} + v_{x0}}} & \lbrack {{Equation}4} \rbrack\end{matrix}$$V_{y0} = {{\frac{v_{y1} - v_{y0}}{S + 4}4} + {\frac{v_{y2} - v_{y0}}{S + 4}4} + v_{y0}}$$V_{x1} = {{\frac{v_{x1} - v_{x0}}{S + 4}( {S + 4} )} + {\frac{v_{x2} - v_{x0}}{S + 4}4} + v_{x0}}$$V_{y1} = {{\frac{v_{y1} - v_{y0}}{S + 4}( {S + 4} )} + {\frac{v_{y2} - v_{y0}}{S + 4}4} + v_{y0}}$$V_{x2} = {{\frac{v_{x1} - v_{x0}}{S + 4}4} + {\frac{v_{x2} - v_{x0}}{S + 4}( {S + 4} )} + v_{x0}}$$V_{y2} = {{\frac{v_{y1} - v_{y0}}{S + 4}4} + {\frac{v_{y2} - v_{y0}}{S + 4}( {S + 4} )} + v_{y0}}$

In the cases of (b) to (f), a motion vector at each control point may bederived based on changed coordinates through the same method or motionvectors in units of a sample or a sub-block in the current block may bedirectly obtained based on changed coordinates.

Meanwhile, a plurality of neighboring blocks per control point of thecurrent block may be present as candidate blocks. In this case,availability check may be performed according to priority of candidateblocks.

FIG. 10 illustrates neighboring blocks with respect to each controlpoint of a current block.

Referring to FIG. 10 , neighboring candidate blocks with respect to CP0of a current block 1000 may include an upper left neighboring block1011, a left neighboring block 1012 and an upper neighboring block 1013of the current block 1000. Here, the left neighboring block 1012 may bethe uppermost block among left blocks adjacent to the left boundary ofthe current block 1000 and the upper neighboring block 1013 may be theleftmost block among upper blocks adjacent to the upper boundary of thecurrent block 1000. Various availability check orders for the candidateblocks may be applied. For example, availability check may be performedin the order of the upper left neighboring block 1011, the leftneighboring block 1012 and the upper neighboring block 1013 or in theorder of the left neighboring block 1012, the upper left neighboringblock 1011 and the upper neighboring block 1013.

In addition, neighboring candidate blocks for CP1 of the current block1000 may include an upper right neighboring block 1021 and an upperneighboring block 1022 of the current block 1000. Here, the upperneighboring block 1022 may be the uppermost block among upper blocksadjacent to the upper boundary of the current block 1000. Variousavailability check orders for the candidate blocks may be applied. Forexample, availability check may be performed in the order of the upperright neighboring block 1021 and the upper neighboring block 1022 or inthe order of the upper neighboring block 1022 and the upper rightneighboring block 1021.

Furthermore, neighboring candidate blocks for CP2 of the current block1000 may include a lower left neighboring block 1031 and a leftneighboring block 1032 of the current block 1000. Here, the leftneighboring block 1032 may be the lowest block among left blocksadjacent to the left boundary of the current block 1000. Variousavailability check orders for the candidate blocks may be applied. Forexample, availability check may be performed in the order of the lowerleft neighboring block 1031 and the left neighboring block 1032 or inthe order of the left neighboring block 1032 and the lower leftneighboring block 1031.

Further, availability check for determining whether neighboringcandidate blocks are valid may be performed based on at least one of thefollowing conditions.

-   -   Availability check is applied when a neighboring candidate block        is present. For example, the neighboring candidate block needs        to be present in a picture and/or a slice and needs to be a        block which can be referred to in coding order. For example,        cases in which the neighboring candidate block is not available        may include a case in which the corresponding neighboring block        is positioned outside the current picture (e.g., it may be        determined that an upper lift neighboring block or a lower left        neighboring block of the current block is not available when the        current block is positioned adjacent to the left boundary of the        current picture), a case in which the corresponding neighboring        block is positioned in a slice or a tile different from the        current block, and the like. Here, a slice may be a sequence of        an integer number of CTUs. The CTUs in the slice may be included        in an independent slice segment and subsequent dependent slice        segments. A tile is a rectangular region including CTUs (CTBs).        The rectangular region may be divided based on a specific tile        column and a specific tile row in a picture.    -   Availability check is applied when a candidate block is in the        inter-mode. For example, the transformation prediction model may        not be applied to the current block if any one of neighboring        candidate blocks of three control points of the current block        has been coded into the intra-prediction mode. This is because        it is difficult to determine motion tendency of an image with        respect to the current block when any one of the neighboring        candidate blocks has been coded into the intra-prediction mode.        When one of candidate blocks is in the intra-mode and the        remaining candidate blocks are candidate blocks for CPs disposed        on a straight line as another example, a transformation        prediction model limited to only two control points may be        applied. In this case, Equation 3 may be applied as described        above.    -   Availability check may be applied when the transformation        prediction mode is applied to any one of neighboring candidate        blocks. When a neighboring candidate block has been coded into        the transformation prediction mode, block transformation        information of the current block and block transformation        information of the neighboring candidate block may be similar        and thus there is a high possibility that the block        transformation information becomes an MVP suitable to derive        motion vectors of control points.    -   Availability check may be applied when neighboring candidate        blocks have the same inter-prediction direction. This is because        motion vectors of neighboring candidate blocks having different        prediction directions have relatively low accuracy in prediction        of a degree of transformation of the current block.

Meanwhile, a reference picture index for the current block may beexplicitly signaled from an encoding device or may be derived based onneighboring candidate blocks. When available candidate blocks use thesame reference picture index, the reference picture index may be used asa reference picture index for the current block. When availablecandidate blocks have different reference picture indexes, iftransformation information about the current block is predicted frommotion vectors for different reference pictures, prediction accuracy maybe low. Accordingly, the same reference picture index needs to be used.When candidate blocks have different reference picture indexes, thereference picture index for the current block may be derived based onone of the following methods.

-   -   The reference picture index for the current block is fixed to 0.    -   A minimum value among reference picture indexes in the same        reference picture list of neighboring candidate blocks is used.    -   A mode among reference picture indexes in the same reference        picture list of neighboring candidate blocks is used.

In this case, a motion vector of a candidate block may be scaled inconsideration of a POC distance and used according to a derivedreference picture index. Here, the motion vector of the candidate blockmay be scaled based on a POC difference between the current picture anda reference picture of the candidate block and a POC difference betweenthe current picture and a reference picture (indicated by the referencepicture index) of the current block.

According to the above-described method, (transformation prediction)motion vectors of control points of the current block can be obtainedbased on neighboring candidate blocks, and (transformation prediction)motion vectors of sub-blocks or sample points of the current block canbe efficiently derived based on the motion vectors of the controlpoints. A decoding device can derive a reference region in a referencepicture indicated by a reference picture index for the current blockbased on motion vectors of the current block and generate predictionsamples and reconstructed samples for the current block based onreconstructed samples in the reference region.

FIG. 11 schematically shows an example of a video encoding methodaccording to the present invention. The method shown in FIG. 11 may beperformed by an encoding device.

Referring to FIG. 11 , the encoding device derives control points CPswith respect to a current block (S1100). Two or three CPs may be used.

For example, the number of CPs may be 2. In this case, the coordinatesof CP0 among the CPs may be (0, 0) and the coordinates of CP1 may be (S,0) when the coordinates of the top-left sample position of the currentblock are (0, 0) and the height and the width of the current block areS.

Alternatively, the number of CPs may be 3. In this case, the coordinatesof CP0 among the CPs may be (0, 0), the coordinates of CP1 may be (S, 0)and the coordinates of CP2 may be (0, S) when the coordinates of thetop-left sample position of the current block are (0, 0) and the heightand the width of the current block are S. When the height of the currentblock is S and the width thereof is W, the coordinates of CP0 among theCPs may be (0, 0), the coordinates of CP1 may be (W, 0) and thecoordinates of CP2 may be (0, H).

The encoding device acquires motion vectors for the CPs (S1110). Forexample, the encoding device may acquire the motion vectors for the CPsbased on neighboring candidate blocks according to a predefined method.That is, the motion vectors for the CPs may be derived based on motionvectors of neighboring blocks of the current block. In this case, themotion vectors of the CPs may be acquired based on motion vectors ofneighboring blocks adjacent to the CPs.

Alternatively, the encoding device may detect optimum motion vectors forthe CPs according to motion estimation.

The encoding device derives motion vectors in units of a sub-block or asample in the current block based on the acquired motion vectors(S1120). The encoding device may derive motion vectors in units of asub-block or a sample in the current block according to thetransformation prediction model of the present invention and performmore accurate inter-prediction through the motion vectors.

For example, when the number of CPs is 2, the motion vectors in units ofa sub-block or a sample in the current block may be derived based on theaforementioned equation 3. In this case, v_(x) and v_(y) may becalculated based on the aforementioned equation 3. Here, v_(x) and v_(y)represent x and y components of a motion vector for coordinates (x, y)in the current block, as described above.

Alternatively, when the number of CPs is 3, the motion vectors in unitsof a sub-block or a sample in the current block may be derived based onthe aforementioned equation 2.

The sub-blocks may have a uniform size. That is, the sub-blocks may havea size of n×n. Here, n may be a positive integer or a power of 2. Forexample, n may be 4.

When motion vectors are derived in units of the sub-block, a motionvector corresponding to the coordinates of the top-left sample positionof a sub-block may be used as a motion vector for the sub-block. Asanother example, a motion vector corresponding to the coordinates of acenter lower right side sample position of a sub-block may be used as amotion vector for the sub-block. Here, the center lower right sidesample position may refer to the position of a lower right sample amongfour samples positioned at the center of the sub-block.

The encoding device generates a prediction sample for the current blockbased on the derived motion vectors (S1130). If the prediction mode forthe current block is not the skip mode, the encoding device may generatea residual sample (or residual signal) based on the original sample ofthe original picture and the prediction sample.

The encoding device encodes information about the prediction mode forthe current block and the derived motion vectors and outputs the encodedinformation (S1140). The encoding device may encode the informationabout the prediction mode for the current block and the derived motionvectors and output the encoded information in the form of a bitstream.The bitstream may be transmitted to a decoding device through a networkor a storage medium.

Although not shown, the decoding device may encode information about theresidual sample for the current block and output the encodedinformation. The information about the residual sample may includetransform coefficients with respect to the residual sample. FIG. 12schematically shows an example of a video decoding method according tothe present invention. The method shown in FIG. 12 may be performed by adecoding device.

Referring to FIG. 12 , the decoding device derives control points CPsfor the current block (S1200). Two or three CPs may be used.

For example, the number of CPs may be 2. In this case, the coordinatesof CP0 among the CPs may be (0, 0) and the coordinates of CP1 may be (S,0) when the coordinates of the top-left sample position of the currentblock are (0, 0) and the height and the width of the current block areS.

Alternatively, the number of CPs may be 3. In this case, the coordinatesof CP0 among the CPs may be (0, 0), the coordinates of CP1 may be (S, 0)and the coordinates of CP2 may be (0, S) when the coordinates of thetop-left sample position of the current block are (0, 0) and the heightand the width of the current block are S. When the height of the currentblock is S and the width thereof is W, the coordinates of CP0 among theCPs may be (0, 0), the coordinates of CP1 may be (W, 0) and thecoordinates of CP2 may be (0, H).

The decoding device derives and acquires motion vectors for the CPs(S1210).

The motion vectors for the CPs may be derived based on motion vectors ofneighboring blocks of the current block. In this case, the motionvectors of the CPs may be acquired based on motion vectors ofneighboring blocks adjacent to the CPs.

For example, the decoding device may derive neighboring candidate blocksfor the current block. In this case, the neighboring candidate blocksmay include an upper left neighboring block, an upper right neighboringblock and a lower left neighboring block.

For example, the motion vector of CP0 may be acquired based on the upperleft neighboring block, the motion vector of CP1 may be acquired basedon the upper right neighboring block, and the motion vector of CP2 maybe acquired based on the lower left neighboring block.

Alternatively, the coordinates of the top-left sample position or acenter lower right sample position of the upper left neighboring blockmay be reset to (0, 0) as described above with reference to FIGS. 9A to9F, and the motion vectors for the CPs may be acquired based on thereset coordinates and the motion vectors of the neighboring candidateblocks.

Alternatively, the decoding device may derive motion vector 0 for CP0based on neighboring block group 0 including an upper left neighboringblock, a first left neighboring block and a first upper neighboringblock, derive motion vector 1 for CP1 based on neighboring block group 1including an upper right neighboring block and a second upperneighboring block, and derive motion vector 2 for CP2 based onneighboring block group 2 including a lower left neighboring block and asecond left neighboring block. Here, the first left neighboring blockmay be the uppermost block among left neighboring blocks adjacent to theleft boundary of the current block, the first upper neighboring blockmay be the leftmost block among upper neighboring blocks adjacent to theupper boundary of the current block, the second upper neighboring blockmay be the rightmost block among upper neighboring blocks adjacent tothe upper boundary of the current block, and the second left neighboringblock may be the uppermost block among left neighboring blocks adjacentto the left boundary of the current block.

In this case, the decoding device may sequentially determineavailability based on predefined priority of candidate blocks and derivea motion vector of a corresponding CP based on a motion vector of anavailable candidate block. For example, the decoding device maysequentially determine availability for the upper left neighboringblock, the first left neighboring block and the first upper neighboringblock according to a predefined first priority, sequentially determineavailability for the upper right neighboring block and the second upperneighboring block according to a predefined second priority, andsequentially determine availability for the lower left neighboring blockand the second left neighboring block according to a predefined thirdpriority.

The decoding device derives motion vectors in units of a sub-block or asample in the current block based on the acquired motion vectors(S1220).

The decoding device may derive motion vectors in units of a sub-block ora sample in the current block according to the transformation predictionmodel of the present invention and perform more accurateinter-prediction through the motion vectors.

For example, when the number of CPs is 2, the motion vectors in units ofa sub-block or a sample in the current block may be derived based on theaforementioned equation 3. In this case, v_(x) and v_(y) may becalculated based on the aforementioned equation 3. Here, v_(x) and v_(y)represent x and y components of a motion vector for coordinates (x, y)in the current block, as described above.

Alternatively, when the number of CPs is 3, the motion vectors in unitsof a sub-block or a sample in the current block may be derived based onthe aforementioned equation 2.

The sub-block may have a uniform size. That is, the sub-block may have asize of n×n. Here, n may be a positive integer or a power of 2. Forexample, n may be 4.

When motion vectors are derived in units of the sub-block, a motionvector corresponding to the coordinates of the top-left sample positionof a sub-block may be used as a motion vector for the sub-block. Asanother example, a motion vector corresponding to the coordinates of acenter lower right side sample position of a sub-block may be used as amotion vector for the sub-block. Here, the center lower right sidesample position may refer to the position of a lower right sample amongfour samples positioned at the center of the sub-block.

The decoding device derives a prediction sample (or a prediction samplearray) for the current block based on the derived motion vectors(S1230). In this case, the decoding device may derive a referencepicture based on a reference picture index of the current block, derivea reference region indicated by a motion vector in units of a sample ora sub-block in the reference picture, and use a reconstructed sample inthe reference region as a prediction sample for the current block. Thereference picture index of the current block may be fixed to 0 or may bederived based on reference picture indexes of neighboring blocks of thecurrent block. Alternatively, a minimum value or a mode among referencepicture indexes in the same reference picture list of neighboringcandidate blocks may be used as the reference picture index of thecurrent block.

The decoding device generates a reconstructed sample based on theprediction sample (S1240). The decoding device may use the predictionsample as a reconstructed sample or add a residual sample to theprediction sample to generate a reconstructed sample according toprediction mode.

Although not shown, the decoding device may receive and parse predictionmode information about the current block and information about themotion vectors of the CPs from a bitstream. The prediction modeinformation may indicate the prediction mode with respect to the currentblock. For example, the prediction mode may represent whether the skipmode, the merge mode or the AVMP mode is applied to the current block orrepresent whether the transformation prediction model (mode) is appliedto the current block. The information about the motion vectors of theCPs is information for indicating the motion vectors of the CPs and mayindicate a neighboring block to be used among neighboring blocks of thecurrent block or indicate a method used to derive the motion vectors ofthe CPs.

In addition, the decoding device may receive information about aresidual sample for the current block from the bitstream when a residualsignal for the current block is present. The information about theresidual sample may include transform coefficients with respect to theresidual sample. The decoding device may derive the residual sample (orresidual sample array) for the current block based on the informationabout the residual sample. The decoding device may generate areconstructed sample based on the prediction sample and the residualsample and derive a reconstructed block or a reconstructed picture basedon the reconstructed sample.

FIG. 13 is a block diagram schematically showing a predictor included inan encoding apparatus according to the present invention.

Referring to FIG. 13 , the predictor 1300 included in the encodingapparatus according to the present invention may include a predictionmode determination module 1310, a motion vector derivation module 1320and a prediction sample derivation module 1330.

The prediction mode determination module 1310 may determine aninter-prediction mode for the current block. For example, the predictionmode determination module 1310 may determine whether the merge mode orthe AMVP mode is applied to the current block and determine whether theabove-described transformation prediction mode is applied. Theprediction mode determination module 1310 may determine an optimumprediction mode based on RD costs according to various prediction modes.

The motion vector derivation module 1320 derives at least one motionvector for the current block. The motion vector derivation module 1330may detect a reference region in a reference picture through motionestimation. Alternatively, the motion vector derivation module 1320 mayderive an optimum motion vector candidate among limited motion vectorcandidates according to a determined algorithm.

The motion vector derivation module 1320 may derive control points CPsfor the current block when the transformation prediction mode is appliedto the current block. In this case, two or three CPs may be used. Thatis, the motion vector derivation module 1320 may determine the number ofCPs used for the current block.

For example, when two CPs are used, the coordinates of CP0 among the CPsmay be (0, 0) and the coordinates of CP1 may be (S, 0) if thecoordinates of the top-left sample position of the current block are (0,0) and the height and the width of the current block are S.

As another example, when three CPs are used, the coordinates of CP0among the CPs may be (0, 0), the coordinates of CP1 may be (S, 0) andthe coordinates of CP2 may be (0, S) if the coordinates of the top-leftsample position of the current block are (0, 0) and the height and thewidth of the current block are S. If the height of the current block isH and the width thereof is W, the coordinates of CP0 among the CPs maybe (0, 0), the coordinates of CP1 may be (W, 0) and the coordinates ofCP2 may be (0, H).

The motion vector derivation module 1320 may derive and acquire motionvectors for the

CPs. The motion vector derivation module 1320 may derive the motionvectors for the CPs based on the motion vector of the current block. Inthis case, the motion vector derivation module 1320 may acquire a motionvector for a corresponding CP based on a motion vector of a neighboringblock adjacent to each CP.

For example, the motion vector derivation module 1320 may deriveneighboring candidate blocks for the current block. In this case, theneighboring candidate blocks may include an upper left neighboringblock, an upper right neighboring block and a lower left neighboringblock.

For example, a motion vector of CP0 may be acquired based on the upperleft neighboring block, a motion vector of CP1 may be acquired based onthe upper right neighboring block, and a motion vector of CP2 may beacquired based on the lower left neighboring block.

Alternatively, the coordinates of the top-left sample position or acenter lower right sample position of the upper left neighboring blockmay be reset to (0, 0) as described above with reference to FIGS. 9A to9F, and the motion vectors for the CPs may be acquired based on thereset coordinates and the motion vectors of the neighboring candidateblocks.

Alternatively, the motion vector derivation module 1320 may derivemotion vector 0 for

CP0 based on neighboring block group 0 including an upper leftneighboring block, a first left neighboring block and a first upperneighboring block, derive motion vector 1 for CP1 based on neighboringblock group 1 including an upper right neighboring block and a secondupper neighboring block, and derive motion vector 2 for CP2 based onneighboring block group 2 including a lower left neighboring block and asecond left neighboring block. Here, the first left neighboring blockmay be the uppermost block among left neighboring blocks adjacent to theleft boundary of the current block, the first upper neighboring blockmay be the leftmost block among upper neighboring blocks adjacent to theupper boundary of the current block, the second upper neighboring blockmay be the rightmost block among upper neighboring blocks adjacent tothe upper boundary of the current block, and the second left neighboringblock may be the uppermost block among left neighboring blocks adjacentto the left boundary of the current block.

In this case, the motion vector derivation module 1320 may sequentiallydetermine availability based on predefined priority of candidate blocksand derive a motion vector of a corresponding CP based on a motionvector of an available candidate block. For example, the motion vectorderivation module 1320 may sequentially determine availability for theupper left neighboring block, the first left neighboring block and thefirst upper neighboring block according to a predefined first priority,sequentially determine availability for the upper right neighboringblock and the second upper neighboring block according to a predefinedsecond priority, and sequentially determine availability for the lowerleft neighboring block and the second left neighboring block accordingto a predefined third priority.

The motion vector derivation module 1320 derives motion vectors in unitsof a sub-block or a sample in the current block based on the motionvectors for the CPs. The motion vector derivation module 1320 may derivemotion vectors in units of a sub-block or a sample in the current blockaccording to the transformation prediction model of the presentinvention and perform more accurate inter-prediction through the motionvectors.

For example, when the number of CPs is 2, the motion vector derivationmodule 1320 may derive motion vectors in units of a sub-block or asample in the current block based on the aforementioned equation 3. Inthis case, v_(x) and v_(y) may be calculated based on the aforementionedequation 3. Here, v_(x) and v_(y) represent x and y components of amotion vector for coordinates (x,y) in the current block, as describedabove.

Alternatively, when the number of CPs is 3, the motion vector derivationmodule 1320 may derive the motion vectors in units of a sub-block or asample in the current block based on the aforementioned equation 2.

The prediction sample derivation module 1330 derives a prediction sample(or prediction sample array) for the current block based on the derivedmotion vectors in units of a sub-block or a sample.

In this case, the prediction sample derivation module 1330 may derive areference region indicated by a motion vector in units of a sample or asub-block in a reference picture, and use a reconstructed sample in thereference region as a prediction sample for the current block. In thiscase, at least one of reference picture list 0 (L0) and referencepicture list 1 (L1) may be used.

FIG. 14 is a block diagram schematically showing a predictor included inthe decoding apparatus according to the present invention.

Referring to FIG. 14 , the predictor 1400 included in the decodingapparatus according to the present invention may include a predictionmode determination module 1410, a motion vector derivation module 1420and a prediction sample derivation module 1430.

The prediction mode determination module 1410 may determine a predictionmode for the current block. For example, the prediction modedetermination module 1410 may determine whether the merge mode or theAMVP mode is applied to the current block and determine whether theabove-described transformation prediction mode is applied. Theprediction mode determination module 1410 may determine a predictionmode applied to the current block based on a predetermined criterion ormode information acquired from a bitstream through a decoding unit.

The motion vector derivation module 1420 derives at least one motionvector for the current block.

The motion vector derivation module 1420 may derive control points CPsfor the current block when the transformation prediction mode is appliedto the current block. In this case, two or three CPs may be used. Thatis, the motion vector derivation module 1420 may determine the number ofCPs used for the current block.

For example, when two CPs are used, the coordinates of CP0 among the CPsmay be (0,0) and the coordinates of CP1 may be (S, 0) if the coordinatesof the top-left sample position of the current block are (0, 0) and theheight and the width of the current block are S.

As another example, when three CPs are used, the coordinates of CP0among the CPs may be (0, 0), the coordinates of CP1 may be (S, 0) andthe coordinates of CP2 may be (0, S) if the coordinates of the top-leftsample position of the current block are (0, 0) and the height and thewidth of the current block are S. If the height of the current block isH and the width thereof is W, the coordinates of CP0 among the CPs maybe (0, 0), the coordinates of CP1 may be (W, 0) and the coordinates ofCP2 may be (0, H).

The motion vector derivation module 1420 may derive and acquire motionvectors for the CPs. The motion vector derivation module 1420 may derivethe motion vectors for the CPs based on the motion vector of the currentblock. In this case, the motion vector derivation module 1420 mayacquire a motion vector for a corresponding CP based on a motion vectorof a neighboring block adjacent to each CP.

For example, the motion vector derivation module 1420 may deriveneighboring candidate blocks for the current block. In this case, theneighboring candidate blocks may include an upper left neighboringblock, an upper right neighboring block and a lower left neighboringblock.

For example, a motion vector of CP0 may be acquired based on the upperleft neighboring block, a motion vector of CP1 may be acquired based onthe upper right neighboring block, and a motion vector of CP2 may beacquired based on the lower left neighboring block.

Alternatively, the coordinates of the top-left sample position or acenter lower right sample position of the upper left neighboring blockmay be reset to (0, 0) as described above with reference to FIGS. 9A to9F, and the motion vectors for the CPs may be acquired based on thereset coordinates and the motion vectors of the neighboring candidateblocks.

Alternatively, the motion vector derivation module 1420 may derivemotion vector 0 for CP0 based on neighboring block group 0 including anupper left neighboring block, a first left neighboring block and a firstupper neighboring block, derive motion vector 1 for CP1 based onneighboring block group 1 including an upper right neighboring block anda second upper neighboring block, and derive motion vector 2 for CP2based on neighboring block group 2 including a lower left neighboringblock and a second left neighboring block. Here, the first leftneighboring block may be the uppermost block among left neighboringblocks adjacent to the left boundary of the current block, the firstupper neighboring block may be the leftmost block among upperneighboring blocks adjacent to the upper boundary of the current block,the second upper neighboring block may be the rightmost block amongupper neighboring blocks adjacent to the upper boundary of the currentblock, and the second left neighboring block may be the uppermost blockamong left neighboring blocks adjacent to the left boundary of thecurrent block.

In this case, the motion vector derivation module 1420 may sequentiallydetermine availability based on predefined priority of candidate blocksand derive a motion vector of a corresponding CP based on a motionvector of an available candidate block. For example, the motion vectorderivation module 1420 may sequentially determine availability for theupper left neighboring block, the first left neighboring block and thefirst upper neighboring block according to a predefined first priority,sequentially determine availability for the upper right neighboringblock and the second upper neighboring block according to a predefinedsecond priority, and sequentially determine availability for the lowerleft neighboring block and the second left neighboring block accordingto a predefined third priority.

The motion vector derivation module 1420 derives motion vectors in unitsof a sub-block or a sample in the current block based on the motionvectors for the CPs. The motion vector derivation module 1420 may derivemotion vectors in units of a sub-block or a sample in the current blockaccording to the transformation prediction model of the presentinvention and perform more accurate inter-prediction through the motionvectors.

For example, when the number of CPs is 2, the motion vector derivationmodule 1420 may derive motion vectors in units of a sub-block or asample in the current block based on the aforementioned equation 3. Inthis case, v_(x) and v_(y) may be calculated based on the aforementionedequation 3. Here, v_(x) and v_(y) represent x and y components of amotion vector for coordinates (x,y) in the current block, as describedabove.

Alternatively, when the number of CPs is 3, the motion vector derivationmodule 1420 may derive the motion vectors in units of a sub-block or asample in the current block based on the aforementioned equation 2.

The prediction sample derivation module 1430 derives a prediction sample(or prediction sample array) for the current block based on the derivedmotion vectors in units of a sub-block or a sample.

In this case, the prediction sample derivation module 1430 may derive areference picture based on a reference picture index of the currentblock, derive a reference region indicated by a motion vector in unitsof a sample or a sub-block in the reference picture, and use areconstructed sample in the reference region as a prediction sample forthe current block. In this case, at least one of reference picture list0 (L0) and reference picture list 1 (L1) may be used. The referencepicture index of the current block for L0 or L1 may be fixed to 0 or maybe derived based on reference picture indexes of neighboring blocks ofthe current block. Alternatively, a minimum value or a mode amongreference picture indexes in the same reference picture list ofneighboring candidate blocks may be used as the reference picture indexof the current block.

According to the above-described present invention, it is possible toderive more accurate motion vectors for the current block andconsiderably increase inter-prediction efficiency.

In addition, according to the present invention, it is possible toefficiently derive (transformation prediction) motion vectors forsub-blocks or sample points of the current block based on(transformation prediction) motion vectors of control points of thecurrent block.

Furthermore, according to the present invention, it is possible toeffectively perform inter-prediction through (transformation prediction)motion vectors not only when an image in the current block is moved in aplane but also when the image is rotated, zoomed in, zoomed out ortransformed into a parallelogram. Accordingly, the amount of data for aresidual signal for the current block can be eliminated and the overallcoding efficiency can be improved.

The above-described methods according to the present invention may berealized in the form of software, and the encoding device and/or thedecoding device according to the present invention may be included inimage processing apparatuses such as a TV, a computer, a smartphone, aset-top box and a display device, for example.

The above description is only illustrative of the technical idea of thepresent invention. Therefore, those skilled in the art may make variousmodifications and variations to the above description without departingfrom the essential characteristics of the present invention.Accordingly, the embodiments disclosed herein are intended to beillustrative, not limiting, of the present invention. The scope of thepresent invention is not limited by these embodiments. The scope ofprotection of the present invention should be construed according to thefollowing claims.

When the embodiments of the present invention are implemented insoftware, the above-described method may be implemented by modules(processes, functions, and so on) that perform the functions describedabove. Such modules may be stored in memory and executed by a processor.The memory may be internal or external to the processor, and the memorymay be coupled to the processor using various well known means. Theprocessor may comprise an application-specific integrated circuit(ASIC), other chipsets, a logic circuit and/or a data processing device.The memory may include a ROM (read-only memory), a RAM (random accessmemory), a flash memory, a memory card, a storage medium, and/or otherstorage device.

What is claimed is:
 1. A video decoding method performed by a decodingapparatus, the method comprising: deriving control points (CPs) for acurrent block; acquiring motion vectors for the CPs; deriving motionvectors sub-blocks in the current block based on the acquired motionvectors; deriving a prediction sample for the current block based on thederived motion vectors; and generating a reconstructed sample based onthe prediction sample, wherein based on a number of CPs being 3, and acoordinate of CP0 among the CPs are (0,0), a coordinate of CP1 are (S,0) and a coordinate of CP2 are (0, S), wherein a coordinate of atop-left sample position of the current block is (0, 0) and a height anda width of the current block are S, wherein the acquiring of the motionvectors for the CPs comprises: deriving motion vector 0 for CP0 based onneighboring block group 0 including an upper left neighboring block, afirst left neighboring block and a first upper neighboring block;deriving motion vector 1 for CP1 based on neighboring block group 1including an upper right neighboring block and a second upperneighboring block; and deriving motion vector 2 for CP2 based onneighboring block group 2 including a lower left neighboring block and asecond left neighboring block, wherein it is sequentially determinedwhether the upper left neighboring block, the first left neighboringblock and the first upper neighboring block are available according to apredefined first priority, it is sequentially determined whether theupper right neighboring block and the second upper neighboring block areavailable according to a predefined second priority, and it issequentially determined whether the lower left neighboring block and thesecond left neighboring block are available according to a predefinedthird priority, and wherein the first left neighboring block is theuppermost block among left neighboring blocks adjacent to the leftboundary of the current block, the first upper neighboring block is theleftmost block among upper neighboring blocks adjacent to the upperboundary of the current block, the second upper neighboring block is therightmost block among upper neighboring blocks adjacent to the upperboundary of the current block, and the second left neighboring block isthe lowermost block among the left neighboring blocks adjacent to theleft boundary of the current block.
 2. The video decoding method ofclaim 1, wherein a sub-block has a size of n×n and n is a positiveinteger.
 3. The video decoding method of claim 2, wherein n is
 4. 4. Avideo encoding method performed by an encoding apparatus, comprising:deriving control points (CPs) for a current block; acquiring motionvectors for the CPs; deriving motion vectors of sub-blocks in thecurrent block based on the acquired motion vectors; generating aprediction sample for the current block based on the derived motionvectors; and encoding prediction mode information for the current blockand information for the derived motion vector and outputting the encodedinformation, wherein based on a number of CPs being 3, and a coordinateof CP0 among the CPs are (0,0), a coordinate of CP1 are (S, 0) and acoordinate of CP2 are (0, S), wherein a coordinate of a top-left sampleposition of the current block is (0, 0) and a height and a width of thecurrent block are S, wherein the acquiring of the motion vectors for theCPs comprises: deriving motion vector 0 for CP0 based on neighboringblock group 0 including an upper left neighboring block, a first leftneighboring block and a first upper neighboring block; deriving motionvector 1 for CP1 based on neighboring block group 1 including an upperright neighboring block and a second upper neighboring block; andderiving motion vector 2 for CP2 based on neighboring block group 2including a lower left neighboring block and a second left neighboringblock, wherein it is sequentially determined whether the upper leftneighboring block, the first left neighboring block and the first upperneighboring block are available according to a predefined firstpriority, it is sequentially determined whether the upper rightneighboring block and the second upper neighboring block are availableaccording to a predefined second priority, and it is sequentiallydetermined whether the lower left neighboring block and the second leftneighboring block are available according to a predefined thirdpriority, and wherein the first left neighboring block is the uppermostblock among left neighboring blocks adjacent to the left boundary of thecurrent block, the first upper neighboring block is the leftmost blockamong upper neighboring blocks adjacent to the upper boundary of thecurrent block, the second upper neighboring block is the rightmost blockamong upper neighboring blocks adjacent to the upper boundary of thecurrent block, and the second left neighboring block is the lowermostblock among the left neighboring blocks adjacent to the left boundary ofthe current block.
 5. A transmission method of data for an image signal,the method comprising: obtaining a bitstream for the video signal,wherein the bitstream is generated based on deriving control points(CPs) for a current block, acquiring motion vectors for the CPs,deriving motion vectors sub-blocks in the current block based on theacquired motion vectors, deriving a prediction sample for the currentblock based on the derived motion vectors, and generating areconstructed sample based on the prediction sample, transmitting thedata comprising the bitstream, wherein based on a number of CPs being 3,and a coordinate of CP0 among the CPs are (0, 0), a coordinate of CP1are (S, 0) and a coordinate of CP2 are (0, S), wherein a coordinate of atop-left sample position of the current block is (0, 0) and a height anda width of the current block are S, wherein the acquiring of the motionvectors for the CPs comprises: deriving motion vector 0 for CP0 based onneighboring block group 0 including an upper left neighboring block, afirst left neighboring block and a first upper neighboring block;deriving motion vector 1 for CP1 based on neighboring block group 1including an upper right neighboring block and a second upperneighboring block; and deriving motion vector 2 for CP2 based onneighboring block group 2 including a lower left neighboring block and asecond left neighboring block, wherein it is sequentially determinedwhether the upper left neighboring block, the first left neighboringblock and the first upper neighboring block are available according to apredefined first priority, it is sequentially determined whether theupper right neighboring block and the second upper neighboring block areavailable according to a predefined second priority, and it issequentially determined whether the lower left neighboring block and thesecond left neighboring block are available according to a predefinedthird priority, and wherein the first left neighboring block is theuppermost block among left neighboring blocks adjacent to the leftboundary of the current block, the first upper neighboring block is theleftmost block among upper neighboring blocks adjacent to the upperboundary of the current block, the second upper neighboring block is therightmost block among upper neighboring blocks adjacent to the upperboundary of the current block, and the second left neighboring block isthe lowermost block among the left neighboring blocks adjacent to theleft boundary of the current block.